import { createApp } from 'vue'
import App from './App.vue'

// 引入element plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 导入所有图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


// 引入pinia
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'

const pinia = createPinia()
pinia.use(piniaPersist)

// 引入路由实例
import router from './router'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(ElementPlus)
app.use(pinia)
app.use(router)

app.mount('#app')
